package com.qrxl.user.vo.res;

import com.qrxl.enums.EnumSysFlag;
import com.qrxl.user.entity.Role;
import com.qrxl.user.entity.UserLogin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(value = "用户列表返回对象", description = "方法参数")
public class UserLoginListRes extends UserLogin {


    @ApiModelProperty(value = "是否有效名称")
    private String validFlagName;

    @ApiModelProperty(value = "角色列表")
    private List<Role> roleList;



    public String getValidFlagName() {
        if (super.getValidFlag() == null) {
            return null;
        }
        return EnumSysFlag.getType(super.getValidFlag()).getName();
    }
}
